package cn.tedu.homew.secondWork;
//针对 属性为引用类型
public class Demo1 {

    Person person1;
    Person person2;

    public Person getPerson1() {
        return person1;
    }

    public void setPerson1(Person person1) {
        this.person1 = person1;
    }

    public Person getPerson2() {
        return person2;
    }

    public void setPerson2(Person person2) {
        this.person2 = person2;
    }

    @Override
    public String toString() {
        return "Demo1{" +
                "person1=" + person1 +
                ", person2=" + person2 +
                '}';
    }
}
